import service from "@/utils/request";

const SampleApplyApi = {
  addSampleApply: function(data) {
    return service.post("sample/apply/addApply", data);
  },
  editSampleApply(data) {
    return service.put("sample/apply/updateApply", data);
  },
  updateSampleApplyState(data) {
    return service.put("sample/apply/updateState", data);
  },
  deleteSampleApply(data) {
    return service.delete("sample/apply", { params: data });
  },
  listSampleApply(data) {
    return service.get("/sample/apply/listApply", { params: data });
  },
  // 获取采样员列表
  getSampleUserLsit(data){
    return service.get("sampleUser/listIdAndName", { params: data });
  },
  getSampleApplyInfo(data) {
    return service.get("sample/apply/getApplyInfo", { params: data });
  },
  getSampleApplyUserInfo(data) {
    return service.get("sample/apply/getUserInfo", { params: data });
  },
  getSampleApplyUserByApplyId(data) {
    return service.get("sample/apply/getUserInfoByApplyId", { params: data });
  },
  updateSampleApplyUser(data) {
    return service.put("sample/apply/updateUserInfo", data);
  },
  deleteApply(data) {
    return service.put("sample/apply/deleteApply", data);
  },

  addSampleReport(data) {
    return service.post("sample/apply/addReport", data);
  },
  reBackSampleReport(data) {
    return service.get("sample/apply/reBackReport", { params: data });
  },
  getCountByInsReportCode(data) {
    // 统计已录医检条码号的总数
    return service.get("sample/apply/getCountByInsReportCode", {
      params: data
    });
  },
  getStatistics(data) {
    // 统计已录人员的总数、混检数、单检数
    return service.get("sample/apply/getStatistics", { params: data });
  },
  getSampleExport: function(data) {
    // 导出excal表格
    return service.get("sample/apply/SampleApplysExport", { params: data });
  },
  batchBinding:function(data){
    // 批量绑定
    return service.get("sample/apply/addGroupApplyIds",{params:data})
  },
  setNotice(data){
    // 设置公告
    return service.put("/sample/apply/setNotice",data)
  },
  getNotice(data){
    // 获取公告内容
    return service.get("/sample/apply/getNotice",{params:data})
  },
  setSampleApplyMch(data){
    // 设置采样商户号
    return service.put("/sample/apply/setSampleApplyMch",data)
  },
  getSampleApplyMch(data){
    // 获取采样商户号
    return service.get("/sample/apply/getSampleApplyMch",{params:data})
  },
};

export default SampleApplyApi;
